package com.atguigu.gmall.order.client;

import com.atguigu.gmall.model.order.OrderInfo;
import com.atguigu.gmall.order.client.fallback.OrderFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @author wk
 * @create 2021-09-10 21:55
 */
@Service
@FeignClient(value = "service-order", fallback = OrderFeignClientFallBack.class)
public interface OrderFeignClient {
    // 订单列表
    @GetMapping("/api/order/getTradeData")
    Map getTradeData();

    // 查询订单详细信息
    @GetMapping("/api/order/getOrderInfo/{orderId}")
    OrderInfo getOrderInfo(@PathVariable Long orderId);
}
